{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Instr =  0 ( 0 )\n",
      "[   1,    1,    1,    9]    [LWD , LWD , LWD , LWD ]    \n",
      "[   2,    2,    2,    0]    [LWD , LWD , LWD , NOP ]    \n",
      "[   3,    3,    3,    0]    [LWD , LWD , LWD , NOP ]    \n",
      "[   0,    0,    0,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "-------\n",
      "Instr =  1 ( 1 )\n",
      "[   2,    2,    2,    6]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[   4,    4,    4,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   6,    6,    6,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   0,    0,    0,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "-------\n",
      "Instr =  2 ( 2 )\n",
      "[   1,    1,    1,    9]    [SADD, SADD, SADD, BEQ ]    \n",
      "[   2,    2,    2,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  10,   10,   10,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   2,    2,    2,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "-------\n",
      "Instr =  3 ( 3 )\n",
      "[   4,    4,    4,    9]    [LWD , LWD , LWD , NOP ]    \n",
      "[   1,    1,    1,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   2,    2,    2,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  12,   12,   12,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "-------\n",
      "Instr =  4 ( 4 )\n",
      "[   8,    8,    8,    5]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[   2,    2,    2,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   4,    4,    4,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  24,   12,   12,   12]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  5 ( 5 )\n",
      "[   4,    4,    4,    9]    [SADD, SADD, SADD, BEQ ]    \n",
      "[   1,    1,    1,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   6,    6,    6,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   8,    8,    8,   36]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  6 ( 6 )\n",
      "[   5,    5,    5,    9]    [LWD , LWD , LWD , NOP ]    \n",
      "[   4,    4,    4,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   1,    1,    1,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  14,   14,   14,   36]    [SADD, SADD, SADD, SWD ]    \n",
      "-------\n",
      "Instr =  7 ( 7 )\n",
      "[  10,   10,   10,    4]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[   8,    8,    8,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   2,    2,    2,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  28,   14,   14,   14]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  8 ( 8 )\n",
      "[   5,    5,    5,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   4,    4,    4,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  10,   10,   10,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  10,   10,   10,   42]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  9 ( 6 )\n",
      "[   6,    6,    6,    6]    [LWD , LWD , LWD , NOP ]    \n",
      "[   5,    5,    5,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   4,    4,    4,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  20,   20,   20,   42]    [SADD, SADD, SADD, SWD ]    \n",
      "-------\n",
      "Instr =  10 ( 7 )\n",
      "[  12,   12,   12,    3]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[  10,   10,   10,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   8,    8,    8,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  40,   20,   20,   20]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  11 ( 8 )\n",
      "[   6,    6,    6,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   5,    5,    5,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  18,   18,   18,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  12,   12,   12,   60]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  12 ( 6 )\n",
      "[   7,    7,    7,    6]    [LWD , LWD , LWD , NOP ]    \n",
      "[   6,    6,    6,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   5,    5,    5,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  30,   30,   30,   60]    [SADD, SADD, SADD, SWD ]    \n",
      "-------\n",
      "Instr =  13 ( 7 )\n",
      "[  14,   14,   14,    2]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[  12,   12,   12,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  10,   10,   10,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  60,   30,   30,   30]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  14 ( 8 )\n",
      "[   7,    7,    7,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   6,    6,    6,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  22,   22,   22,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  14,   14,   14,   90]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  15 ( 6 )\n",
      "[   8,    8,    8,    6]    [LWD , LWD , LWD , NOP ]    \n",
      "[   7,    7,    7,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   6,    6,    6,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  36,   36,   36,   90]    [SADD, SADD, SADD, SWD ]    \n",
      "-------\n",
      "Instr =  16 ( 7 )\n",
      "[  16,   16,   16,    1]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[  14,   14,   14,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  12,   12,   12,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  72,   36,   36,   36]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  17 ( 8 )\n",
      "[   8,    8,    8,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   7,    7,    7,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  26,   26,   26,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  16,   16,   16,  108]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  18 ( 6 )\n",
      "[   9,    9,    9,    6]    [LWD , LWD , LWD , NOP ]    \n",
      "[   8,    8,    8,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   7,    7,    7,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  42,   42,   42,  108]    [SADD, SADD, SADD, SWD ]    \n",
      "-------\n",
      "Instr =  19 ( 7 )\n",
      "[  18,   18,   18,    0]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[  16,   16,   16,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  14,   14,   14,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  84,   42,   42,   42]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  20 ( 8 )\n",
      "[   9,    9,    9,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   8,    8,    8,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  30,   30,   30,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  18,   18,   18,  126]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  21 ( 9 )\n",
      "[   9,    9,    9,    6]    [NOP , NOP , NOP , NOP ]    \n",
      "[   8,    8,    8,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  30,   30,   30,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  48,   48,   48,  126]    [SADD, SADD, SADD, SWD ]    \n",
      "-------\n",
      "Instr =  22 ( 10 )\n",
      "[   9,    9,    9,    6]    [NOP , NOP , NOP , NOP ]    \n",
      "[   8,    8,    8,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  30,   30,   30,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  96,   48,   48,   48]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  23 ( 11 )\n",
      "[   9,    9,    9,    6]    [NOP , NOP , NOP , NOP ]    \n",
      "[   8,    8,    8,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  30,   30,   30,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  96,   48,   48,  144]    [NOP , NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  24 ( 12 )\n",
      "[   9,    9,    9,    6]    [EXIT, NOP , NOP , NOP ]    \n",
      "[   8,    8,    8,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  30,   30,   30,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  96,   48,   48,  144]    [NOP , NOP , NOP , SWD ]    \n",
      "\n",
      "\n",
      "END\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "sys.path.append(\"../src/\")\n",
    "from cgra import *\n",
    "\n",
    "# Set the kernel name\n",
    "kernel_name = \"convolution\"\n",
    "version = \"_v1\"\n",
    "# Input data\n",
    "clear_memory(kernel_name, version)\n",
    "add_memory_region(kernel_name, 36464, [1, 2, 3, 4, 5, 6, 7, 8, 9], version)\n",
    "add_memory_region(kernel_name, 100, [9], version)\n",
    "# Set load and write addrs\n",
    "load_addrs = [36464, 36464, 36464, 100]\n",
    "store_addrs = [0, 0, 0, 4]\n",
    "# Run the example\n",
    "run(kernel_name, version=version, pr=[\"ROUT\",\"OPS\"], load_addrs=load_addrs, store_addrs=store_addrs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "4, [1, 2, 3, 4, 5, 6, 7, 8, 9], version)\n",
    "add_memory_region(kernel_name, 100, [9], version)\n",
    "# Set load and write addrs\n",
    "load_addrs = [36464, 36464, 36464, 100]\n",
    "store_addrs = [0, 0, 0, 4]\n",
    "# Run the example\n",
    "run(kernel_name, version=version, pr=[\"ROUT\",\"OPS\"], load_addrs=load_addrs, store_addrs=store_addrs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Instr =  0 ( 0 )\n",
      "[   1,    1,    1,    9]    [LWI , LWI , LWI , LWD ]    \n",
      "[   2,    2,    2,    0]    [LWD , LWD , LWD , NOP ]    \n",
      "[   3,    3,    3,    0]    [LWD , LWD , LWD , NOP ]    \n",
      "[   0,    0,    0,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "-------\n",
      "Instr =  1 ( 1 )\n",
      "[   2,    2,    2,    6]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[   4,    4,    4,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   6,    6,    6,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   0,    0,    0,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "-------\n",
      "Instr =  2 ( 2 )\n",
      "[   0,    0,    0,    9]    [SADD, SADD, SADD, BEQ ]    \n",
      "[   2,    2,    2,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  10,   10,   10,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   2,    2,    2,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "-------\n",
      "Instr =  3 ( 3 )\n",
      "[   4,    4,    4,    9]    [LWD , LWD , LWD , NOP ]    \n",
      "[   0,    0,    0,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   2,    2,    2,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  12,   12,   12,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "-------\n",
      "Instr =  4 ( 4 )\n",
      "[   8,    8,    8,    5]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[   0,    0,    0,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   4,    4,    4,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  24,   12,   12,   12]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  5 ( 5 )\n",
      "[   4,    4,    4,    9]    [SADD, SADD, SADD, BEQ ]    \n",
      "[   0,    0,    0,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   4,    4,    4,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   8,    8,    8,   36]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  6 ( 6 )\n",
      "[   5,    5,    5,    9]    [LWD , LWD , LWD , NOP ]    \n",
      "[   4,    4,    4,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   0,    0,    0,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  12,   12,   12,   36]    [SADD, SADD, SADD, SWI ]    \n",
      "-------\n",
      "Instr =  7 ( 7 )\n",
      "[  10,   10,   10,    4]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[   8,    8,    8,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   0,    0,    0,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  24,   12,   12,   12]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  8 ( 8 )\n",
      "[   5,    5,    5,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   4,    4,    4,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   8,    8,    8,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  10,   10,   10,   36]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  9 ( 6 )\n",
      "[   6,    6,    6,    6]    [LWD , LWD , LWD , NOP ]    \n",
      "[   5,    5,    5,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   4,    4,    4,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  18,   18,   18,   36]    [SADD, SADD, SADD, SWI ]    \n",
      "-------\n",
      "Instr =  10 ( 7 )\n",
      "[  12,   12,   12,    3]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[  10,   10,   10,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[   8,    8,    8,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  36,   18,   18,   18]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  11 ( 8 )\n",
      "[   6,    6,    6,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   5,    5,    5,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  18,   18,   18,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  12,   12,   12,   54]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  12 ( 6 )\n",
      "[   7,    7,    7,    6]    [LWD , LWD , LWD , NOP ]    \n",
      "[   6,    6,    6,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   5,    5,    5,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  30,   30,   30,   54]    [SADD, SADD, SADD, SWI ]    \n",
      "-------\n",
      "Instr =  13 ( 7 )\n",
      "[  14,   14,   14,    2]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[  12,   12,   12,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  10,   10,   10,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  60,   30,   30,   30]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  14 ( 8 )\n",
      "[   7,    7,    7,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   6,    6,    6,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  22,   22,   22,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  14,   14,   14,   90]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  15 ( 6 )\n",
      "[   8,    8,    8,    6]    [LWD , LWD , LWD , NOP ]    \n",
      "[   7,    7,    7,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   6,    6,    6,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  36,   36,   36,   90]    [SADD, SADD, SADD, SWI ]    \n",
      "-------\n",
      "Instr =  16 ( 7 )\n",
      "[  16,   16,   16,    1]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[  14,   14,   14,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  12,   12,   12,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  72,   36,   36,   36]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  17 ( 8 )\n",
      "[   8,    8,    8,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   7,    7,    7,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  26,   26,   26,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  16,   16,   16,  108]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  18 ( 6 )\n",
      "[   9,    9,    9,    6]    [LWD , LWD , LWD , NOP ]    \n",
      "[   8,    8,    8,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[   7,    7,    7,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  42,   42,   42,  108]    [SADD, SADD, SADD, SWI ]    \n",
      "-------\n",
      "Instr =  19 ( 7 )\n",
      "[  18,   18,   18,    0]    [SMUL, SMUL, SMUL, SSUB]    \n",
      "[  16,   16,   16,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  14,   14,   14,    0]    [SMUL, SMUL, SMUL, NOP ]    \n",
      "[  84,   42,   42,   42]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  20 ( 8 )\n",
      "[   9,    9,    9,    6]    [SADD, SADD, SADD, BNE ]    \n",
      "[   8,    8,    8,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  30,   30,   30,    0]    [SADD, SADD, SADD, NOP ]    \n",
      "[  18,   18,   18,  126]    [SADD, SADD, SADD, SADD]    \n",
      "-------\n",
      "Instr =  21 ( 9 )\n",
      "[   9,    9,    9,    6]    [NOP , NOP , NOP , NOP ]    \n",
      "[   8,    8,    8,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  30,   30,   30,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  48,   48,   48,  126]    [SADD, SADD, SADD, SWI ]    \n",
      "-------\n",
      "Instr =  22 ( 10 )\n",
      "[   9,    9,    9,    6]    [NOP , NOP , NOP , NOP ]    \n",
      "[   8,    8,    8,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  30,   30,   30,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  96,   48,   48,   48]    [SADD, NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  23 ( 11 )\n",
      "[   9,    9,    9,    6]    [NOP , NOP , NOP , NOP ]    \n",
      "[   8,    8,    8,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  30,   30,   30,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  96,   48,   48,  144]    [NOP , NOP , NOP , SADD]    \n",
      "-------\n",
      "Instr =  24 ( 12 )\n",
      "[   9,    9,    9,    6]    [EXIT, NOP , NOP , NOP ]    \n",
      "[   8,    8,    8,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  30,   30,   30,    0]    [NOP , NOP , NOP , NOP ]    \n",
      "[  96,   48,   48,  144]    [NOP , NOP , NOP , SWI ]    \n",
      "\n",
      "\n",
      "END\n"
     ]
    }
   ],
   "source": [
    "from cgra import *\n",
    "# Set the kernel name\n",
    "kernel_name = \"convolution\"\n",
    "version = \"_v2\"\n",
    "# Input data\n",
    "clear_memory(kernel_name, version)\n",
    "add_memory_region(kernel_name, 1000, [1,1,1], version)\n",
    "add_memory_region(kernel_name, 36464, [1, 2, 3, 4, 5, 6, 7, 8, 9], version)\n",
    "add_memory_region(kernel_name, 100, [9], version)\n",
    "# Set load and write addrs\n",
    "load_addrs = [36468, 36468, 36468, 100]\n",
    "# Run the example\n",
    "run(kernel_name, version=version, pr=[\"ROUT\",\"OPS\"], load_addrs=load_addrs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
